//
//  PlayViewController.m
//  03 为视频添加滤镜
//
//  Created by dllo on 16/3/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "PlayViewController.h"
#import "NHPlayerView.h"
@interface PlayViewController ()

@property(nonatomic, strong)NHPlayerView *playerView;

@end

@implementation PlayViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    // 创建视图
    [self createView];
    
}
- (void)createView{
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    NSString *playerURLStr = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Movie.mov"];
    
    // 创建视图
    self.playerView = [[NHPlayerView alloc] initWithFrame:CGRectMake(0, 128, 414, 414)];
    [self.view addSubview:self.playerView];
    
    // 设置播放链接
    self.playerView.playerURLStr = playerURLStr;
    
    // 设置播放视图的背景色
    self.playerView.backgroundColor = [UIColor colorWithRed:246 / 255.0 green:246 / 255.0 blue:246 / 255.0 alpha:1];
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
